<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>实验室管理系统
        
    </title>
    
    
    
    <script src="<?php echo (JS_URL); ?>\assetce.js"></script>

    <link rel="stylesheet" href="<?php echo (CSS_URL); ?>\reset.css">
    <link rel="stylesheet" href="<?php echo (CSS_URL); ?>\style.css">
    <link rel="stylesheet" href="<?php echo (CSS_URL); ?>\common.css">
    <link rel="stylesheet" href="<?php echo (CSS_URL); ?>\fixedit.css">
    <link rel="stylesheet" href="<?php echo (CSS_URL); ?>\footer.css">
    <script src="<?php echo (JS_URL); ?>\jquery-3.2.1.min.js"></script>
    <script src="<?php echo (LIBS_URL); ?>\jquery.validate.js"></script>
    <script src="<?php echo (LIBS_URL); ?>\jquery.validate.messages_cn.js"></script>
    <link href="<?php echo (CSS_URL); ?>\bootstrap.css" rel="stylesheet">
    <script src="<?php echo (JS_URL); ?>\bootstrap.min.js"></script>
    <link href="<?php echo (CSS_URL); ?>\bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="<?php echo (LIBS_URL); ?>/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="<?php echo (LIBS_URL); ?>/bootstrap-datetimepicker.min.css">
    <script src="<?php echo (LIBS_URL); ?>/bootstrap-datetimepicker.fr.js"></script>
    <script src="<?php echo (LIBS_URL); ?>/bootstrap-datetimepicker.js"></script>
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
    
    
    
    <script src="<?php echo (JS_URL); ?>\assetce.js"></script>

</head>
<style>
    .pagination a,.pagination span{
        position: relative;
        float: left;
        padding: 6px 12px;
        margin-left: -1px;
        line-height: 1.42857143;
        color: #337ab7;
        text-decoration: none;
        background-color: #fff;
        border: 1px solid #ddd;
    }
</style>
<body>
<!-- 页头和导航 -->
<div class="container-fluid">
    <div class="container-fluid top">
        <div class="personal">
            <a href="#" id="exit">
                <i class="fa fa-power-off"></i>
                <span>注销</span>
            </a>
            <a href="">林小明</a>
            <span>2017年12月12日</span>
            <span>星期六</span>
        </div>
    </div>
    <div class="container">
        <div class="logo">
            <img src="<?php echo (IMG_URL); ?>/logo.jpg" alt=""/>
            <span>东莞理工学院公用机房管理系统</span>
        </div>
        <!-- 导航 -->
        <div>
            <div class="navtop"></div>
            <div class="nav">
                <a style="margin-left:0px;" href="<?php echo U('index/index');?>">首页</a>
                <a href="<?php echo U('LabApply/labapply');?>">实验室申请</a>
                <a href="<?php echo U('InstrumentLend/index');?>">资产与耗材</a>
                <a href="<?php echo U('WarningList/index');?>">设备报障</a>
                <a href="<?php echo U('LostList/index');?>">失物招领</a>
                <a href="<?php echo U('Advice/index');?>">意见建议</a>
                <a href="<?php echo U('TeachAdvice/index');?>">教学环境评价</a>
                <a href="<?php echo U('NoticeList/index');?>">公告</a>
            </div>
        </div>
    </div>
</div>
<!-- 内容 -->

    <div class="container">
        <div class="menu_l" >
            <div class="Na" style="margin-left:13px;" ><span style="word-break:normal;"></span>
            </div>
            <dl id="dl1" class="close1">
                <dt  onclick="onelist(this)" style="background-color:#019858">
                    <span><img id="img0" src="images/right.png"/>仪器借用</span>
                </dt>
                <dd ><a href="<?php echo U('InstrumentLend/index');?>" style="color:#333333;text-decoration: none;"><span>填写申请表 </span></a></dd>
                <dd style="background-color:#019858"><a href="<?php echo U('MyAsset/index');?>" style="color:#333333;text-decoration: none;"><span>我的借用记录</span></a></dd>
            </dl>
            <dl id="dl2" class="close1">
                <dt  onclick="onelist(this)"> <span><img id="img1"src="images/right.png"/>耗材领取</span></dt>
                <dd style="background-color:#019858"><a href="<?php echo U('Material/index');?>" style="color:#333333;text-decoration: none;"><span>填写申请表</span></a></dd>
                <dd><a href="<?php echo U('MyMaterial/index');?>" style="color:#333333;text-decoration: none;"><span>我的领取记录</span></a></dd>
            </dl>
            <dl id="dl3" class="close1">
                <dt  onclick="onelist(this)" style="background-color:#019858"> <span><img img id="img2" src="images/right.png"/>申购</span></dt>
                <dd ><a href="<?php echo U('ApplicationApply/index');?>" style="color:#333333;text-decoration: none;"><span>仪器设备申购</span></a></dd>
                <dd   style="background-color:#019858"><a href="<?php echo U('MaterialApply/index');?>" style="color:#333333;text-decoration: none;"><span>耗材申购</span></a></dd>
            </dl>
        </div>
        <div class="lendForm" style="width: 84%;float: right;text-align: center;">
            <!--样式在common.css-->
            <div class="tipTitle" style="text-align: left">
                <i class="fa fa-smile-o fa-2x"></i>&nbsp;&nbsp;<span>仪器设备申购</span>
            </div>
            <div class="sousuo">
                <form class="form-inline" method="get" action="<?php echo U('ApplicationApply/index');?>" id="myform">
                    <!--学年选择-->
                    <label for="">学年</label>
                    <select name="year" class="form-control" onchange="submitForm()" id="">
                        <?php if($year==0): ?><option value="0" selected>全部</option>
                            <?php else: ?><option value="0">全部</option><?php endif; ?>
                        <?php if(is_array($now_term)): foreach($now_term as $k2=>$v2): if($year==$v2['xueyear']): ?><option value='<?php echo ($v2["xueyear"]); ?>'selected><?php echo ($v2["xueyear"]); ?>-<?php echo ($v2['xueyear']+1); ?></option>
                                <?php else: ?><option value='<?php echo ($v2["xueyear"]); ?>'><?php echo ($v2["xueyear"]); ?>-<?php echo ($v2['xueyear']+1); ?></option><?php endif; endforeach; endif; ?>
                    </select>
                    <!--学期选择-->
                    <label for="">学期：</label>
                    <select name="term" class="form-control" onchange="submitForm()">
                        <?php if($term==0): ?><option value="0" selected>全部</option>
                            <?php else: ?><option value="0">全部</option><?php endif; ?>
                        <?php if($term==1): ?><option value="1" selected>第一学期</option>
                            <?php else: ?><option value="1">第一学期</option><?php endif; ?>
                        <?php if($term==2): ?><option value="2" selected>第二学期</option>
                            <?php else: ?><option value="2">第二学期</option><?php endif; ?>
                    </select>
                    <!--审核状态选择-->
                    <label for="">审核状态</label>
                    <select name="check_status" class="form-control" onchange="submitForm()" id="check_status">
                        <?php if($check_status==0): ?><option value="0" selected>全部</option>
                            <?php else: ?><option value="0">全部</option><?php endif; ?>
                        <?php if($check_status==1): ?><option value="1" selected>未审核</option>
                            <?php else: ?><option value="1">未审核</option><?php endif; ?>
                        <?php if($check_status==2): ?><option value="2" selected>已审核</option>
                            <?php else: ?><option value="2">已审核</option><?php endif; ?>
                    </select>
                    <?php if(isset($name) != 0): ?><input class="form-control" style="width:120px;display:inline-block" type="text" placeholder="请输入仪器名" name="search" value="<?php echo ($name); ?>">
                        <?php else: ?>
                        <input class="form-control" style="width:120px;display:inline-block" type="text" placeholder="请输入仪器名" name="search"><?php endif; ?>
                    <button  type="submit" class="btn btn-default">
                        <i class="fa fa-search"></i>
                    </button>
                </form>
            </div>
            <div class="wList">
                <table class="table table-hover">
                    <thead>
                    <td>物品名称</td>
                    <td>数量</td>
                    <td>申购日期</td>
                    <td>审核状态</td>
                    <td>审核日期</td>
                    </thead>
                    <tbody>
                    <?php if(is_array($apply)): foreach($apply as $k1=>$v1): ?><tr>
                            <td><a href="<?php echo U('ApplyDetail/index');?>?id=<?php echo ($v1["id"]); ?>"><?php echo ($v1["goods_name"]); ?></a></td>
                            <td><?php echo ($v1["count"]); ?></td>
                            <?php
 $create_time = date("Y-m-d", $v1['time']);?>
                            <td><?php echo ($create_time); ?></td>
                            <?php if($v1['status'] == 1): ?><td>未审核</td>
                                <?php else: ?><td>已审核</td><?php endif; ?>
                            <?php
 $time = date("Y-m-d", $v1['check_time']);?>
                            <td><?php echo ($time); ?></td>
                        </tr><?php endforeach; endif; ?>
                    </tbody>
                </table>
                <nav class="fenye" aria-label="Page navigation">
                    <ul class="pagination">
                        <?php echo ($show); ?>
                    </ul>

                </nav>
                <div class="fenTotal">共 <?php echo ($count); ?> 条记录</div>
            </div>

        </div>
    </div>

<!-- 页脚 -->


<div class="sfooter" style="margin-top: 30px;">
    <span>Copyright © 东莞理工学院教务处 All Rights Reserved</span><br/>
    <span>地址：广东省东莞市松山湖大学路1号 邮编：523808</span><br/>
    <span>电话：0769-22861099</span><br/>
</div>
<!-- 页脚结束 -->

</body>
</html>

    <script>
        var nana=document.getElementById('exit');
        nana.onclick=function(){
            var check=confirm("确认注销吗？");
            if(check){
                alert("注销成功");
            }else{

            }
        }
    </script>


    <script>
        //表单下拉框选择直接提交数据
        function submitForm(){
            //获取form表单对象
            var form = document.getElementById("myform");
            form.submit();//form表单提交
        }

    </script>


    <!--导航变色-->
    <script>
        var nav=document.getElementsByClassName('nav')[0].getElementsByTagName('a');
        nav[2].className='active';
    </script>